Angular 5 Projects by Mark Clow

Angular 5 Projects by Mark Clow

Author:Mark Clow
Language: eng
Format: epub, pdf
Publisher: Apress, Berkeley, CA


© Mark Clow 2018

Mark ClowAngular 5 Projectshttps://doi.org/10.1007/978-1-4842-3279-8_13

13. Dependency Injection

Mark Clow1

(1)Sandy Springs, Georgia, USA

In software engineering, dependency injection is a software design pattern that implements inversion of control for resolving dependencies. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it. After getting used to Angular, you will take the dependency injection for granted because it is so easy to use.

For example, this code

var svc = new ShippingService(new ProductLocator(),

new PricingService(), new InventoryService(),

new TrackingRepository(new ConfigProvider()),

new Logger(new EmailLogger(new ConfigProvider())));



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.